﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using System.Collections.Generic;

using TerminologiaSinacor.Presenter;

public partial class page_GlossarioDescricao : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
            Glossario glossario = new Glossario();
            glossario.Descricao = Request.Params["descricao"];

            this.ViewState["GlossarioFiltro"] = glossario;
            BindingGrid(glossario); 
    }

    private void BindingGrid(Glossario glossario)
    {
        List<Glossario> glossarios = new List<Glossario>();
        glossarios = glossario.search(glossario);
        GrdGlossario.DataSource = glossarios; 
        GrdGlossario.DataBind();
    }

    protected void GrdGlossario_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        Glossario glossario = (Glossario)ViewState["GlossarioFiltro"];
        this.GrdGlossario.PageIndex = e.NewPageIndex;
        BindingGrid(glossario);

    }
}








